<include file="public@header"/>
<style>
    .goods-prompt{width: 100%;float: left;height: inherit;background: #ffffff;margin: 5px 0;border: 1px solid #ddd;padding: 13px 0;}
    .goods-prompt h3{color: #333;padding-left: 10px;margin: 0;font-size: 14px;font-weight: normal;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;border-bottom: 1px solid #ddd;padding-bottom: 15px;}
    .i-circular{display: inline-block;background: #126AE4;border-radius: 50%;width: 8px;height: 8px;margin: -1px 5px 0 0;vertical-align: middle;}
    .goods-prompt h3{color: #000;font-weight: 800;padding-left: 10px;margin: 0;font-size: 14px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
    .goods-prompt h3 span{padding-left: 10px;font-size: 12px;color: #999;font-weight: normal;}
    .goods-state{overflow: hidden;text-align: center;padding: 0 0 30px;}
    .goods-state ul{margin: 0;overflow: hidden;}
    .goods-state ul li{float: left;width: 20%;margin-top: 30px;cursor: pointer;}
    .goods-state ul li a strong{font-size: 22px;font-weight: normal;overflow: hidden;padding: 0 10px;white-space: nowrap;text-overflow: ellipsis;color: #126AE4;display: block;margin: 10px 0;}
    .goods-state ul li a:hover{color: #126AE4;text-decoration: none;}
    li{list-style: none}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('admin_store/index')}">店铺管理</a></li>
        <li><a href="{:url('admin_store/add')}">添加店铺</a></li>
        <li class="active"><a href="JavaScript:;">店铺详情</a></li>
    </ul>
    <div class="row margin-top-20">
        <div class="col-md-2">
            <include file="public@left"/>
        </div>
        <div class="col-md-10">
            <div class="tab-content">

                <table class="table table-hover table-bordered">
                    <tbody>
                        <tr>
                            <th style="width: 150px">店铺头像</th>
                            <td> <if condition="empty($store_info['more']['thumbnail'])">
                                <img src="__TMPL__/public/assets/images/default-thumbnail.png"  width='35' height='35' style='cursor: pointer'/>
                                <else/>
                                <img src="{:cmf_get_image_preview_url($store_info['more']['thumbnail'])}"  width='35' height='35' style='cursor: hand'/>
                            </if></td>
                        </tr>
                        <tr>
                            <th>店铺名称</th>
                            <td>{$store_info.store_name} <a class="btn btn-sm" href="{:url('admin_store/edit',array('id'=>$store_id))}">{:lang('EDIT')}</a></td>
                        </tr>
                        <tr>
                            <th>店铺区域</th>
                            <td>{$area}</td>
                        </tr>
                        <tr>
                            <th>店铺详细地址</th>
                            <td>{$store_info.address}</td>
                        </tr>
                        <tr>
                            <th>店铺介绍</th>
                            <td>{:htmlspecialchars_decode($store_info.store_content)}</td>
                        </tr>
                        <tr>
                            <th>店铺定位</th>
                            <td> <a href="javascript:;" onclick="doSelectLocation(this)" data="{$store_info.lng},{$store_info.lat}" class="btn btn-success btn-sm" >查看</a></td>
                        </tr>
                    </tbody>
                </table>
                <div class="goods-prompt">
                    <h3>
                        <i class="i-circular"></i>店铺及会员信息<span>您需要关注的店铺信息以及待处理事项</span>
                    </h3>
                    <div class="goods-state a-line">
                        <ul>
                            <li>
                                <a href="{:cmf_url('admin_store/user_card',array('id'=>$store_id))}">
                                    <strong class="goods_sale_count">{$tj_cards_count}</strong>
                                    <span>推荐会员卡</span>
                                </a>
                            </li>
                            <li>
                                <a href="{:cmf_url('admin_store/tj_order',array('id'=>$store_id))}">
                                    <strong class="goods_audit_count">{$tj_order_count}</strong>
                                    <span>推荐订单</span>
                                </a>
                            </li>
                            <li>
                                <a href="{:cmf_url('admin_store/stock',array('id'=>$store_id))}">
                                    <strong class="goods_consult_count">{$tj_store}</strong>
                                    <span>推荐店铺</span>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <strong class="member_balance_withdraw">0</strong>
                                    <span>店铺余额</span>
                                </a>
                            </li>

                        </ul>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script>
    function doSelectLocation(obj) {
        var $obj       = $(obj);
        var location   = $obj.attr('data');
        parent.openIframeLayer(
            "/admin/dialog/map.html?location=" + location,
            '坐标选择',
            {
                area: ['95%', '90%'],
                btn: ['确定', '取消'],
                yes: function (index, layero) {

                    parent.layer.close(index); //如果设定了yes回调，需进行手工关闭
                }
            }
        );
    }
</script>
</body>
</html>